<?php
class Staticizer_Index_Ancillary_Ordersheet extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select ID,Title,Datetime,M_HTMLFile from News where SubclassID='.DAO_NewsClass::ANCILLARY_ORDERSHEET_ID.' order by M_IsTop desc,DateTime desc limit 0,6');

        #处理数据
        foreach ($data as &$row)
        {
            $row['M_HTMLFile']=Config::PATH_RELATIVE_CONTENT_NEWS.'/'.$row['M_HTMLFile'];
        }
        
        #绑定模块
        View::Assign('NewsClass_ID',DAO_NewsClass::ANCILLARY_ORDERSHEET_ID);
        View::Assign('News',$data);

        #生成静态
        $this->Save('index/news.ancillary_ordersheet.html',View::Fetch('index/news.ancillary_ordersheet.tpl'));
    }
}
?>